package com.encryption.service.util;

import com.encryption.dao.FileDAO;

public class FileCurrentMaxId {
	private static int currentMaxId = 0;
	
	public static int getNextId(){
		int dbCurrentId = FileDAO.getFileDAO().findCurrentMaxId();
		if(dbCurrentId >= currentMaxId){
			currentMaxId = dbCurrentId;
		}
		
		currentMaxId = currentMaxId + 1;
		return currentMaxId;
	}
}
